package com.kaiwukj.android.ufamily.mvp.ui.page.home.mine;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.kaiwukj.android.ufamily.R;

import java.util.ArrayList;

public class ServiceAdapter extends BaseQuickAdapter<ServiceBean, BaseViewHolder> {

    @ServiceBean.Type
    public int getServiceType(int pos) {
        return getItem(pos).getType();
    }

    public ServiceAdapter() {
        super(R.layout.item_mine_service, new ArrayList<>());
    }

    @Override
    protected void convert(BaseViewHolder helper, ServiceBean item) {
        helper.setImageResource(R.id.iv_res, item.getResId());
        helper.setText(R.id.tv_service, item.getName());
    }
}
